import $http from '@/assets/js/http'

//企业列表
export function getCompanyList(name,index,size) {
    return $http.get('/manage/ditu/company/list', {
        params:{
            name: name,
            pageIndex: index,
            pageSize: size,
        }
    });
}
//企业详情
export function getCompanyDetail(id) {
    return $http.get('/manage/ditu/company/detail', {
        params:{
            id:id
        }
    });
}
//删除企业
export function getCompanyDelete(id) {
    return $http.post('/manage/ditu/company/delete', {
        id:id
    });
}
// //新增企业
// export function getCompanyAdd(params) {
//     return $http.post('/manage/ditu/company/add', {
//         name:params.companyName,
//         category:params.category,
//         address:params.address,
//         telephone:params.telephone,
//         contact:params.contact,
//         summary:params.summary,
//         scope:params.scope,
//         logo:params.logo
//     });
// }
// //编辑企业
// export function getCompanyEdit(params) {
//     return $http.post('/manage/ditu/company/update', {
//         id:params.id,
//         name:params.name,
//         category:params.category,
//         address:params.address,
//         telephone:params.telephone,
//         contact:params.contact,
//         summary:params.summary,
//         scope:params.scope,
//         logo:params.logo
//     });
// }

// 附近印刷厂
//附近印厂列表
export function getFactoryList(category,name,index,size) {
    return $http.get('/manage/ditu/factory/list', {
        params:{
            category:category,
            name: name,
            pageIndex: index,
            pageSize: size,
        }
    });
}
//删除印厂
export function getFactoryDelete(id) {
    return $http.post('/manage/ditu/factory/delete', {
        id:id
    });
}
//印厂详情
export function getFactoryDetail(id) {
    return $http.get('/manage/ditu/factory/detail', {
        params:{
            id:id
        }
    });
}
//新增印厂
export function getFactoryCAdd(params) {
    return $http.post('/manage/ditu/factory/add', {
        name:params.companyName,
        category:params.category,
        address:params.address,
        longitude:params.longitude,
        latitude:params.latitude,
        telephone:params.telephone,
        summary:params.summary,
        headImg:params.headImg,
        aptitudeImg:params.aptitudeImg,
        businessImg:params.businessImg
    });
}
//编辑印厂
export function getFactoryCEdit(params) {
    return $http.post('/manage/ditu/factory/update', {
        id:params.id,
        name:params.companyName,
        category:params.category,
        address:params.address,
        longitude:params.longitude,
        latitude:params.latitude,
        telephone:params.telephone,
        summary:params.summary,
        headImg:params.headImg,
        aptitudeImg:params.aptitudeImg,
        businessImg:params.businessImg
    });
}

/*
*平台推荐
*/
//平台推荐列表
export function getYinCList(category,name,index,size) {
    return $http.get('/manage/ditu/press/list', {
        params:{
            category:category,
            name: name,
            pageIndex: index,
            pageSize: size,
        }
    });
}
//删除平台推荐
export function getYinCDelete(id) {
    return $http.post('/manage/ditu/press/delete', {
        id:id
    });
}
//平台推荐详情
export function getYinCDetail(id) {
    return $http.get('/manage/ditu/press/detail', {
        params:{
            id:id
        }
    });
}
//新增平台推荐
export function getYinCAdd(params) {
    return $http.post('/manage/ditu/press/add', {
        name:params.companyName,
        category:params.category,
        address:params.address,
        longitude:params.longitude,
        latitude:params.latitude,
        telephone:params.telephone,
        summary:params.summary,
        headImg:params.headImg,
        aptitudeImg:params.aptitudeImg,
        businessImg:params.businessImg
    });
}
//编辑平台推荐
export function getYinCEdit(params) {
    return $http.post('/manage/ditu/press/update', {
        id:params.id,
        name:params.companyName,
        category:params.category,
        address:params.address,
        longitude:params.longitude,
        latitude:params.latitude,
        telephone:params.telephone,
        summary:params.summary,
        headImg:params.headImg,
        aptitudeImg:params.aptitudeImg,
        businessImg:params.businessImg
    });
}